package com.fimuz.mqmeet.api.common.control;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.fimuz.mqmeet.api.common.service.CommonService;

import com.fimuz.mqmeet.api.loginuser.service.model.CreateOrUpdateSpModel;
import com.fosun.spr.core.base.CoBaseControl;


import com.fimuz.mqmeet.api.common.service.model.ListBuildingregionSpModel;
import com.fimuz.mqmeet.api.common.service.model.ListBuildingregionSrModel;

@RestController
public class CommonControl extends CoBaseControl {
	@Resource
	private CommonService commonService;

	/**
	 * http://127.0.0.1:8080/mq_meet_server/api/common/listBuildingregion
	 * 
	 * @param request
	 * @param spModel
	 * @return
	 */	
	@RequestMapping(value = "/api/common/listBuildingregion",method = RequestMethod.GET)
	public ListBuildingregionSrModel listBuildingregion(HttpServletRequest request, ListBuildingregionSpModel spModel) {
		//SessionUtils.fillSpModel(request, spModel);
		ListBuildingregionSrModel srModel = commonService.listBuildingregion(spModel);
		return srModel;
	}
	
	
	//生成成json的代码
	public static void main(String[] args) throws Exception{
	}	
}
